import 'package:flutter/material.dart';

class OptionsBase {
  // 全局p配置值
  final double titleSize = 18;
  final double tagSize = 15;
  final int refreshTime = 500;

  OptionsBase();

  // 计算图片列表的列数
  int imageColumns(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    int col;
    col = width ~/ 160;
    return col;
  }

  // 计算横屏壁纸列表的列数
  int horizontalColumns(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    int col;
    col = width ~/ 300;
    return col;
  }

  // 计算分类列表的列数
  int typeColumns(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    int col;
    col = width ~/ 100;
    return col;
  }
}
